<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Entity
 *
 * @author AnhHieu
 */
class Entity {
    const HIEN = 1;
    const AN = 2;    
    public static $AN_HIEN_COMBO = array(
        '1' => 'Hiện',
        '2' => 'Ẩn'
    );
    
    const DUNG = 1;
    const SAI = 2;
    public static $DUNG_SAI_COMBO = array(
        '1' => 'Có',
        '2' => 'Không'
    );
    
    protected function locdulieuCapnhat(&$data) {
        $bien = "hocchan' or 1=1 or ten='abc";
        $sql="select * from sv where ten='$bien'";
        $sql="select * from sv where ten='hocchan\' or 1=1 or ten=\'abc'";
        foreach ($data as $key=>$index){
            $data[$key] = mysql_real_escape_string($index);
        }
        return $data;
    }
    
}

?>
